<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>行程管理</title>
	<link rel="stylesheet" href="/css/common2.css">

	<style>
		.search_img {
			position: absolute;
			right: 3%;
		}
	</style>
</head>

<body>
	<div id="vue-root">
		<div class="add">
			<a href="bus_trip_item.html" style="color: white">添加行程</a>
		</div>
		<div class="refresh action-buttons" onclick="location.reload()">刷新</div>
		<!-- <input v-model="search.plate" placeholder="请输入车牌号" class="ui-select search"
			style="position: absolute; right: 410px; max-width: 120px;height: 33px;"> -->
		<img src="../image/search.png" height="35" width="35" class="search_img" @click="getData0">
		<div class="center">
			<div class="table">
				<table class="table_top">
					<thead>
						<tr>
							<th>
								<input type="checkbox" class="check-box" v-model="all">序号
							</th>
							<th>车牌号</th>
							<th>行进线路</th>
							<th>行驶时间段</th>
							<th>学生信息</th>
							<th class="three">编辑/删除</th>
						</tr>
					</thead>
					<tbody id="list">
						<tr v-for="(trip,index) in list" :key="trip.id">
							<td>
								<input type="checkbox" class="check-box" v-model="trip.checked">
								<span v-text="index+1"></span>
							</td>
							<td v-text="trip.plate"></td>
							<td v-text="trip.routeName"></td>
							<td v-text="trip.startTime+' - '+trip.endTime"></td>
							<td>
								<a :href="'bus_passenger.html?id='+trip.id">
									<button>详情</button>
								</a>
							</td>

							<td class="three" style="border-left: none; margin-top: 1px;">
								<div class="option">
									<div class="edit-icon option-icon" style="position: absolute; left: 20%; top: 30%;">
										<a :href="'bus_trip_item.html?id='+trip.id">
											<img class="img" src="../image/edit.png" height="20" width="20"
												onmouseover="this.src='../image/edit_light.png'"
												onmouseout="this.src='../image/edit.png'">
										</a>
									</div>
									<div class="delete-icon option-icon"
										style="right: 20%; top:30%;position: absolute;">
										<img class="img" src="../image/delete.png" height="20" width="20"
											onmouseover="this.src='../image/delete_light.png'"
											onmouseout="this.src='../image/delete.png'" @click="del([trip.id])">
									</div>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>
	</div>


	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				urls: {
					del: '/pc/trip/del',
					list: '/pc/trip/list/' + top_params().id
				}
			}
		}));
	</script>

</body>

</html>